<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>评价列表</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <link rel="stylesheet" href="/node_modules/LobsterUIFrame/weui/css/weui.css" />
    <link rel="stylesheet" href="/node_modules/LobsterUIFrame/weui/css/weuix.css" />
    <script src="/node_modules/LobsterUIFrame/weui/js/zepto.min.js"></script>
    <script src="/node_modules/LobsterUIFrame/weui/js/zepto.weui.js"></script>
    <script src="/node_modules/LobsterUIFrame/weui/js/swipe.js"></script>
    <script src="/node_modules/LobsterUIFrame/weui/js/macy.js"></script>
    <script src="/node_modules/LobsterUIFrame/weui/js/php.js"></script>
    <script src="/lobstersdk/lobster.js"></script>
    <script src="/jslib/template-web.js"></script>
    <style>

    </style>
</head>

<body ontouchstart>
    <div id="evaluatelist">

    </div>
</body>

</html>
<script type="text/html" id="evaluatelisttemp">
        {{each list child}}
        <div  class="evaluteitem{{child.EvaluateId}} weui-media-box weui-media-box_appmsg">
        <div class="weui-media-box__hd"  style="width: 40px;height: 40px;">
            <img class="weui-media-box__thumb" style="border-radius:50%;" src="{{child.UserImg}}" alt="">
        </div>
        <div class="weui-media-box__bd"> 
            <p class="weui-media-box__title">{{child.NickName}}
                {{if(dynamicUserId==child.UserId)}}
                <span style="color: #4F91E2;" >（作者）</span>
                {{/if}}
            </p> 
             <div class="weui-media-box__title">{{child.Content}}</div>  
             <p class="weui-media-box__desc">{{(child.EvaluateTime||"").substring(0,19)}}</p> 
        </div> 
        </div>
        {{/each}} 
</script>
<script>

    lobsterh5.main({
        data: {
            page: 1, limit: 10, hasmore: true,
            evaluatelist: [],
            dynamicUserId: 0,
            dynamicId:0,
            pId:0,
        },
        //初始化页面
        pageload: function () {
            this.initevent();
            var self=this;
            self.data.dynamicId=lobsterh5.GetUrlParam("dynamicId");
            self.data.pId=lobsterh5.GetUrlParam("pId");
            self.data.dynamicUserId=lobsterh5.GetUrlParam("dynamicUserId");
            self.getMoreEvaluateList();
        },
        //初始化事件
        initevent: function () {
            var self = this;

        },
        getMoreEvaluateList() {
            var self=this;
            lobsterh5.GET("/lowcode/APP20211203093514696/name/?fun=Dynamic.GetMoreEvaluateList", {
                dynamicId: self.data.dynamicId,
                pId: self.data.pId,
                dynamicUserId:  self.data.dynamicUserId,
            }).then(res => {
                var appendhtml = template("evaluatelisttemp", { list: res.list, dynamicUserId: self.data.dynamicUserId });
                $("#evaluatelist").html(appendhtml);
            }).catch(res => {
                console.log(res.msg || res);
                $.toast(res.msg || res, 'forbidden');
            })
        }
    }); 
</script>